$(document).ready(function() {
	/**
	 * 返回配置列表
	 */
	$('#btn_back').click(function() {
		location.href = '/Cnf/cnf'
	})


	/**
	 * 处理批量修改配置
	 */
	$('#btn_doBatchEditCnf').click(function() {
		$.ajax({
			url: '/Cnf/doBatchEditCnf',
			type: 'post',
			async: true, //default: true
			data: $('#form_batchEditCnf').serialize(),
			dataType: 'json', // default: Intelligent Guess (xml, json, script, or html)
			success: function (data, textStatus, jqXHR) {
				if (data.status == 200) {
					location.href = '/Cnf/cnf'
				} else if (data.status == 410301) {
					$('#tip_batchEditCnf').html(data.msg)
            		$('#type' + data.id).css('color', 'red')
            		$('#k' + data.id).css('color', 'red')
				}
			}
		})
	})
})